# @Author：silence
# @Email：792245022@qq.com
# @Date：2025/3/3 23:35

import urllib.request

url = "https://movie.douban.com/j/chart/top_list?type=5&interval_id=100%3A90&action=&start=0&limit=20"

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
}

req = urllib.request.Request(url=url, headers=headers)

response = urllib.request.urlopen(req)

content = response.read().decode("utf-8")

path = "douban.json"
with open(path, "w", encoding="utf-8") as fw:
    fw.write(content)